package net.peelmeagrape.hibernate.collections;

import net.peelmeagrape.hibernate.xmlgen.XmlAttribute;
import net.peelmeagrape.hibernate.xmlgen.XmlElement;
import net.peelmeagrape.hibernate.xmlgen.DefaultFromGenericType;
import net.peelmeagrape.hibernate.xmlgen.ProcessTargetClass;

import java.lang.annotation.Retention;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * Use a composite value as map key.
 */
@Retention(RUNTIME)
@XmlElement(name="composite-map-key")
public @interface CompositeMapKey
{
    @XmlAttribute("class")
    @DefaultFromGenericType(0)
    @ProcessTargetClass()
            Class[] targetClass() default {};
}
